#ifndef METAL_H
#define METAL_H

#include <QtCore>
#include <QtWidgets>
#include "rules.h"

class Metal : public QGraphicsItem
{
    friend class Data;
    friend class Cell;
    friend class Routing;
    friend class Routing1;
    friend class Transistor;
    friend class MainWindow;
    friend class Routing2;

    QString metalType;
    qreal* scale;
    QString net;

    bool drawNetName;
    bool contactMetal;
    bool gateM1;

    int porpouse;

    QString band;

    QList<void*> *linkedTransistors;
    QList<Metal*> *linkedMetal;

    QString getCoordinates();

public:
    Metal();

    void copy(Metal *m);

    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
    QRectF boundingRect() const;
    void setMetalType(QString newType);
    QPointF bottomRight;

    void clear();
};

#endif // METAL_H
